package com.yu.service;

import com.yu.dao.ThuiyuanDao;

public class ThuiyuanService {
	private ThuiyuanDao hd = new ThuiyuanDao();
	public String getbyuname(String uname) {
		boolean result = hd.getbyuname(uname);
		if(result) {
			return "{\"msg\":\"success\"}";
		} else {
			return "{\"msg\":\"error\"}";
		}
	}
	public String getbyuphone(String uphone) {
		boolean result = hd.getbyuphone(uphone);
		if(result) {
			return "{\"msg\":\"success\"}";
		} else {
			return "{\"msg\":\"error\"}";
		}
	}
	public String getbyuemail(String uemail) {
		boolean result = hd.getbyuemail(uemail);
		if(result) {
			return "{\"msg\":\"success\"}";
		} else {
			return "{\"msg\":\"error\"}";
		}
	}
	public String save(String uname, String upwd,String realname, String uphone, String uemail, String xingbie, String uage, String dqid) {
		boolean result = hd.save(uname,upwd,realname,uphone,uemail,xingbie,uage,dqid);
		if(result) {
			return "{\"msg\":\"success\"}";
		} else {
			return "{\"msg\":\"error\"}";
		}
	}
}
